package com.rt.easyjava.common.config;

import com.rt.easyjava.common.base.Result;
import com.rt.easyjava.common.enumsUtils.EnumsUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Api(tags = "枚举数据字典-控制类")
@Controller
@RequestMapping("/enum")
public class EnumAction {

    @ApiOperation("根据枚举名称返回数据字典相关列表(添加框中使用) ")
    @GetMapping(value = "/getData4AddBy")
    @ResponseBody
    public Result getData4AddBy(String enumName) throws Exception {
        return EnumsUtils.getData4AddBy(enumName);
    }
}
